package icu.xblogs.report.mapper;

import icu.xblogs.report.domain.Employee;
import icu.xblogs.report.plugin.Page;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author Frank KONG
 * @version 1.0
 * @date 2020/11/16 14:02
 */
@Repository
public interface EmployeeMapper {

    Employee getById(int id);

    List<Employee> getAll();

    List<Employee> getAll(Page page);

    Employee getByIdAndPsw(@Param("id") int id, @Param("password") String password);

    void updatePsw(@Param("id") int id, @Param("oldPassword") String oldPassword, @Param("newPassword") String newPassword);

    String getImg(int id);

    void updateImg(@Param("img") String img, @Param("id") int id);
}
